package com.ztgf.shopping.models.service.shop;

import com.baomidou.mybatisplus.service.IService;
import com.ztgf.shopping.models.bo.shop.ShopCategoryRelationSaveBO;
import com.ztgf.shopping.models.dto.shop.ShopCategoryRelationDTO;
import com.ztgf.shopping.models.vo.shop.CommodityCategoryTreeVO;
import com.ztgf.shopping.models.vo.shop.ShopBrandRelationNewVO;
import com.ztgf.shopping.models.vo.shop.ShopCategoryRelationVO;
import com.ztgf.shopping.models.vo.shop.ShopCategoryVO;

import java.math.BigDecimal;
import java.util.List;

/**
 * 店铺分类表服务
 *
 * @author zhanghualang
 * @Date 2020-05-28 14:42:59
 */
public interface IShopCategoryRelationService extends IService<ShopCategoryRelationDTO> {
    boolean add(ShopCategoryRelationSaveBO saveBO);

    List<ShopCategoryRelationVO> queryList(Long id); //根据店铺ID获取店铺品牌分类

    List<ShopCategoryRelationDTO> queryListByBrandId(Long id); //根据品牌ID获取不重复列表

    List<ShopCategoryVO> getCategoryByShopId(Long id); //根据店铺ID 获取类目信息及抽佣比例

    List<CommodityCategoryTreeVO> queryTreeByBrandId(Long id); //根据品牌ID获取树

    ShopBrandRelationNewVO getBrandNewByBrandId(Long brandId);

    boolean updateShopDividendScale(Long shopId, String ids,BigDecimal dividendScaleRate);//通过店铺修改佣金比例

    Integer updateShopDividendScaleByCategory(String ids,BigDecimal dividendScale);//通过类目修改佣金比例

    boolean updateShopDividendScaleByScheduled(String ids);//通过10分钟定时任务修改店铺佣金比例

    ShopCategoryRelationDTO getCategoryByShopIdAndCommodityId(Long shopId, Long commodityId);
}
